USE [usuarios]
GO

IF  EXISTS (SELECT * FROM sys.foreign_keys WHERE object_id = OBJECT_ID(N'[dbo].[FK_tbl_usuario_informacion_tbl_usuario1]') AND parent_object_id = OBJECT_ID(N'[dbo].[tbl_usuario_informacion]'))
ALTER TABLE [dbo].[tbl_usuario_informacion] DROP CONSTRAINT [FK_tbl_usuario_informacion_tbl_usuario1]
GO

USE [usuarios]
GO

/****** Object:  Table [dbo].[tbl_usuario_informacion]    Script Date: 06/29/2011 09:14:12 ******/
IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[tbl_usuario_informacion]') AND type in (N'U'))
DROP TABLE [dbo].[tbl_usuario_informacion]
GO

USE [usuarios]
GO

/****** Object:  Table [dbo].[tbl_usuario_informacion]    Script Date: 06/29/2011 09:14:12 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[tbl_usuario_informacion](
	[uin_id] [int] NOT NULL,
	[uin_usu_id] [varchar](20) NOT NULL,
	[uin_st_number] [varchar](50) NOT NULL,
	[uin_st_add] [varchar](50) NULL,
	[uin_city] [varchar](30) NOT NULL,
	[uin_state] [varchar](5) NOT NULL,
	[uin_zip] [varchar](20) NOT NULL,
	[uin_tel_oficina] [varchar](20) NOT NULL,
	[uin_tel_celular] [varchar](20) NOT NULL,
	[uin_fax] [varchar](20) NULL,
	[uin_tii_id] [int] NOT NULL,
 CONSTRAINT [PK_tbl_usuario_informacion] PRIMARY KEY CLUSTERED 
(
	[uin_id] ASC
)WITH (PAD_INDEX  = OFF, STATISTICS_NORECOMPUTE  = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS  = ON, ALLOW_PAGE_LOCKS  = ON) ON [PRIMARY]
) ON [PRIMARY]

GO

SET ANSI_PADDING OFF
GO

ALTER TABLE [dbo].[tbl_usuario_informacion]  WITH CHECK ADD  CONSTRAINT [FK_tbl_usuario_informacion_tbl_usuario1] FOREIGN KEY([uin_usu_id])
REFERENCES [dbo].[tbl_usuario] ([usu_id])
ON DELETE CASCADE
GO

ALTER TABLE [dbo].[tbl_usuario_informacion] CHECK CONSTRAINT [FK_tbl_usuario_informacion_tbl_usuario1]
GO


